package itheima.Demo;

import java.util.TreeSet;

public class Demo01 {
    public static void main(String[] args) {
//        HashSet<Student> hs = new HashSet<>();
        TreeSet<Student> ts = new TreeSet<>();
        Student s2 = new Student("明明",95,97,100);
        Student s3 = new Student("花花",95,96,97);
        Student s4 = new Student("花花",91,95,96);
        Student s5 = new Student("花花",91,95,96);
        Student s1 = new Student("玲玲",99,97,100);

       /* hs.add(s1);
        hs.add(s2);
        hs.add(s3);
        hs.add(s4);*/

       ts.add(s1);
       ts.add(s2);
       ts.add(s3);
       ts.add(s4);
       ts.add(s5);

      /*  for (Student h : hs) {
            System.out.println(h);
        }*/
        for (Student t : ts) {
            System.out.println(t);
        }
    }
}
